from h3yun.api import business_data_api
from config.h3yun_config import medical_goods_schemaCode, site_info_schemaCode,medical_changes_goods_schemaCode
from config.api_params.bizObject_params import set_LoadBizObjects_params
from h3yun.service.common_service import find_all_list


# 广西柳药集团股份有限公司 站点编码 02093001
# 广州天宝颂原生物科技开发有限公司 站点编码 01045001
# F0000049 备案销售客户/医院名称编码
# F0000051 销售终端医院编码
# D117400Fnczoagqa7nmbvn0erffeps704.F0000023 生产厂家名称
# D117400Fnczoagqa7nmbvn0erffeps704.F0000045 终端医院供货价
def find_medical_goods_data(matchers=[]):
    return find_all_list(medical_goods_schemaCode, matchers)


# Status == 0 未生效
# Status == 1 已生效
def find_medical_changes_goods_data(matchers=[]):
    return find_all_list(medical_changes_goods_schemaCode, matchers)


if __name__ == '__main__':
    # matchers = [
    #     {
    #         "Type": "And",
    #         "Matchers": [
    #             {
    #                 "Type": "Item",
    #                 "Name": "F0000049",
    #                 "Operator": 8,
    #                 "Value": "02093001"
    #             },
    #         ]
    #     }
    # ]
    # find_medical_goods_data(matchers)
    temp = find_medical_changes_goods_data()
    print(temp[2])
